class UrlMappings {

	static mappings = {
		"/countries"(controller: "countryRest") {
            action = [GET: "list"]
        }

        "/countries/$countryName"(controller: "countryRest") {
            action = [GET: "show"]
        }
		
		"/countries/$countryName/provinces"(controller: "provinceRest") {
			action = [GET: "list"]
		}

		"/countries/$countryName/provinces/$provinceName"(controller: "provinceRest") {
			action = [GET: "show"]
		}
		
		
		"/countries/$countryName/provinces/$provinceName/towns"(controller: "townRest") {
			action = [GET: "list"]
		}
		
		"/countries/$countryName/provinces/$provinceName/towns/$townName"(controller: "townRest") {
			action = [GET: "show"]
		}

		"/countries/$countryName/provinces/$provinceName/towns/$townName/beaches"(controller: "beachRest") {
			action = [GET: "list"]
		}
		
		"/countries/$countryName/provinces/$provinceName/towns/$townName/beaches/$beachName"(controller: "beachRest") {
			action = [GET: "show"]
		}
			
		"/"(controller:"/beachWeb") { action = [GET: "list"] }	
		"/beachWeb" {
			controller = "beachWeb"
			action = "get"
		}
		"/search" {
			controller = "searchable"
			action = "index"
		}

		"500"(view:'/error')

	}
}
